package com.cjjd.c.feature.subscribe.nomal_hotel;

import android.content.Context;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.cjjd.c.R;
import com.cjjd.c.base.recycler.DividerItemDecoration;
import com.cjjd.c.base.recycler.RecyclerAdapter;
import com.cjjd.c.base.recycler.ViewHolder;

import java.util.ArrayList;
import java.util.List;

/**
 * ----------------------------------
 * Created by xyd on 2017/11/23.
 * <p/>
 * 描  述：
 * <p/>
 * 修订历史:
 * ----------------------------------
 */

public class HotelNomalGroupAdapter<T> extends RecyclerAdapter {


    public HotelNomalGroupAdapter(Context context, List dataList, int layoutId) {
        super(context, dataList, layoutId);
    }

    @Override
    public void convert(ViewHolder holder, Object itemData, int position) {
        ArrayList<String> itemArray = (ArrayList<String>) itemData;

        RecyclerView recyclerView = holder.getView(R.id.rcv_group);

        recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
        recyclerView.addItemDecoration(new DividerItemDecoration(mContext,LinearLayoutManager.VERTICAL));
        recyclerView.setAdapter(new HotelNomalItemAdapter<String>(mContext, itemArray, R.layout.item_hotel_item));

    }
}
